<template>
  <view>
    <view class="" style="border-bottom: 4rpx solid #C8A556;padding-bottom: 29rpx;">
      <view class="button_text">
        <text class="button_text1">发起方</text>
      </view>
      <view class="detail">
        <view class="">
          <view>时间: {{file.handleLogPojoList[0].handleTime}}</view>

          <view>终端IP: {{file.handleLogPojoList[0].ipAddress}}</view>
        </view>
        <view class="" style="margin-left: 50rpx;">
          <view>名称: {{file.handleLogPojoList[0].handleName}}</view>
          <!-- <view>地址: HTTPS:/I</view> -->
        </view>
      </view>
      <!-- <view style="margin-left: 80rpx;font-size: 22rpx;margin-top: 8rpx;">浏览器/ UA:</view> -->
    </view>
    <view class="" style="border-bottom: 4rpx solid #C8A556;padding-bottom: 29rpx;overflow-x:hidden;height: 700rpx;">
     
      <view v-for="(item,index) in signatorys" :key="item.userId">
        <view class="button_text">
          <text class="button_text1">签约方</text>
        </view>
        <view class="detail">
          <view class="">
            <view>时间: {{item.handleTime}}</view>

            <view>终端IP: {{item.ipAddress}}</view>
          </view>
          <view class="" style="margin-left: 50rpx;">
            <view>名称: {{item.handleName}}</view>
            <!-- <view>地址: HTTPS:/I</view> -->
          </view>
        </view>
        <!-- <view style="margin-left: 80rpx;font-size: 22rpx;margin-top: 8rpx;">浏览器/ UA:</view> -->
        
        <view class="cunzheng" v-if="item.evidenceInfoList[0].createTime">
          <view class="" style="color: #C8A556;font-size: 30rpx;"><text>存证成功</text></view>
          <view class="hsah">
            <text>时间:2{{item.evidenceInfoList[0].createTime}}</text></br>
            <text >上传图片/视频成功</text>
          </view>
          <!-- <view class="hsah">HASH值SAD35415341354135as4dads14535sad4as35d41AS</view> -->
        </view>
        <view class="cunzheng" v-if="item.handleType==4" >
          <view class="" style="color: #C8A556;font-size: 30rpx;"><text>拒签</text></view>
          <view class="hsah">
            <text>时间:2022-07-05 11:00:00</text>
            <text style="margin-left: 20rpx;"></text>
          </view>
          <view class="hsah"></view>
        </view>
      </view>

    </view>
    
    <!-- <view class="cunzheng">
      <view class="" style="color: #C8A556;font-size: 30rpx;"><text>删除存证</text></view>
      <view class="hsah">
        <text>时间:2022-07-05 11:00:00</text>
        <text style="margin-left: 20rpx;">删除图片/视频成功</text>
      </view>
      <view class="hsah">HASH值SAD35415341354135as4dads14535sad4as35d41AS</view>
    </view> -->
    <view class="cunzheng" v-if="is.handleType==4">
      <view class="" style="color: #C8A556;font-size: 30rpx;"><text>拒签</text></view>
      <view class="hsah">
        <text>时间:{{is.handleTime}}</text>
        <text style="margin-left: 20rpx;"></text>
      </view>
      <view class="hsah"></view>
    </view>
    <view class="cunzheng" v-if="is.handleType==5">
      <view class="" style="color: #C8A556;font-size: 30rpx;"><text>合同名称(签约成功 )</text></view>
      <view class="hsah">
        <text>时间:{{is.handleTime}}</text>
        <text style="margin-left: 20rpx;">上传图片/视频成功</text>
      </view>
      <view class="hsah"></view>
    </view>
  </view>
</template>

<script>
  import {
    mapState
  } from 'vuex'
  export default {
    data() {
      return {
        //签约详情信息
        file: {}
      }
    },
    onLoad(Object) {
      // console.log(Object)
    },
    mounted() {
      const value = uni.getStorageSync("signatoryListLogin");
      this.file = value
      // this.getCourseInfo()
    },
    methods: {
     
    },
    computed: {
      //计算签署方
      signatorys() {
        let num = []
        if (!this.file.handleLogPojoList) return
        var b = JSON.parse(JSON.stringify(this.file.handleLogPojoList));
        num = b.slice(1)
        return num
      },
      //计算出是否签约成功
      is(){
        if(!this.signatorys) return
        let state=null
        this.signatorys.map((item)=>{
          if(item.handleType==4){
            return state=item
          }else if(item.handleType==5){
            return state=item
          }
        })
        return state
      }
    }
  }
</script>

<style>
  .button_text {
    display: inline-block;
    width: 156rpx;
    height: 61rpx;
    color: #C8A556;
    line-height: 70rpx;
    font-size: 30rpx;
    background: #FFFFFF;
    border: 2rpx solid #C8A556;
    border-radius: 60rpx;
    margin: 40rpx 0 0 32rpx;
  }

  .detail {
    display: flex;
    width: 100%;
    padding-left: 80rpx;
    font-size: 22rpx;
    line-height: 50rpx;
  }

  .cunzheng {
    width: 80%;
    height: 144rpx;
    margin: 0 auto;
    margin-top: 20rpx;
    padding: 18rpx 45rpx;
    font-size: 28rpx;
    border: #C8A556 2rpx solid;
    border-radius: 40rpx;
  }

  .hsah {
    font-size: 22rpx;
  }

  .button_text1 {
    position: relative;
    bottom: 7rpx;
    margin-left: 34rpx;

  }
</style>
